package com.macro.mall.model;

import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * ums_member_log实体类
 *
 * @author gaodx
 *
 */
@Data
@Builder
@AllArgsConstructor
public class UmsMemberLog implements Serializable{
	/***/
    @ApiModelProperty(value = "")
	private Long id; 
	/**真实姓名*/
    @ApiModelProperty(value = "用户id")
	private String userId;
	/**真实姓名*/
    @ApiModelProperty(value = "真实姓名")
	private String name;
	/**手机号码*/
    @ApiModelProperty(value = "手机号码")
	private String phone; 
	/**身份证*/
    @ApiModelProperty(value = "身份证")
	private String idCard; 
	/**省*/
    @ApiModelProperty(value = "省")
	private String province; 
	/**市*/
    @ApiModelProperty(value = "市")
	private String city; 
	/**区*/
    @ApiModelProperty(value = "区")
	private String area; 
	/**社区标识*/
    @ApiModelProperty(value = "社区标识")
	private Long communityId; 
	/**社区名称*/
    @ApiModelProperty(value = "社区名称")
	private String communityName; 
	/**楼号*/
    @ApiModelProperty(value = "楼号")
	private String floor;
	/**01 -待审核 02 审核通过 03审核不通过*/
    @ApiModelProperty(value = "01 -待审核 02 审核通过 03审核不通过")
	private String status; 
	/**原因*/
    @ApiModelProperty(value = "原因")
	private String reason; 
	/***/
    @ApiModelProperty(value = "")
	private Date createTime;
	/**02 - 审核通过时间 03 审核不通过时间*/
    @ApiModelProperty(value = "修改时间")
	private Date updateTime;

	/**操作人id*/
    @ApiModelProperty(value = "操作人id")
	private String operationId;
	/**操作人名称*/
    @ApiModelProperty(value = "操作人名称")
	private String operationName;

    @ApiModelProperty(value = "所在城市", required = false, position = 6)
    private String cityCode;
    @ApiModelProperty(value = "区", required = false, position = 7)
    private String countyCode;

	@ApiModelProperty(value = "用户身份 01-居民 02-居委会 03-物业公司 04-业委会 05-物管会 06-管理员 07-供应商 08-政府组织 09-其他", required = false, position = 9)
	private String userIdentity;
	@ApiModelProperty(value = "是否是用户补全信息页 0-否 1-是", required = false, position = 10)
	private Integer completePage;
    
    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    /**
	 * 实例化
	 */
	public UmsMemberLog() {
		super();
	}
	/**
	 * 实例化
	 * 
	 * @param obj
	 */

	public UmsMemberLog(JSONObject obj) {
		this();
		if (obj.get("id") instanceof Number) {
			this.setId(((Number) obj.get("id")).longValue());
		}
		if (obj.get("name") instanceof String) {
			this.setName((String) obj.get("name"));
		}
		if (obj.get("phone") instanceof String) {
			this.setPhone((String) obj.get("phone"));
		}
		if (obj.get("idCard") instanceof String) {
			this.setIdCard((String) obj.get("idCard"));
		}
		if (obj.get("province") instanceof String) {
			this.setProvince((String) obj.get("province"));
		}
		if (obj.get("city") instanceof String) {
			this.setCity((String) obj.get("city"));
		}
		if (obj.get("area") instanceof String) {
			this.setArea((String) obj.get("area"));
		}
		if (obj.get("communityId") instanceof Number) {
			this.setCommunityId(((Number) obj.get("communityId")).longValue());
		}
		if (obj.get("communityName") instanceof String) {
			this.setCommunityName((String) obj.get("communityName"));
		}
		if (obj.get("status") instanceof String) {
			this.setStatus((String) obj.get("status"));
		}
		if (obj.get("reason") instanceof String) {
			this.setReason((String) obj.get("reason"));
		}
		this.setCreateTime((Date) obj.get("createTime"));
		this.setUpdateTime((Date) obj.get("updateTime"));
	}
	
	/**
	 * 将当前对象转换为JsonObject
	 * 
	 * @return
	 */
	public JSONObject toJson() {
		JSONObject result = new JSONObject();
		if (this.getId() != null) {
			result.put("id",this.getId());
		}
		if (this.getName() != null) {
			result.put("name",this.getName());
		}
		if (this.getPhone() != null) {
			result.put("phone",this.getPhone());
		}
		if (this.getIdCard() != null) {
			result.put("idCard",this.getIdCard());
		}
		if (this.getProvince() != null) {
			result.put("province",this.getProvince());
		}
		if (this.getCity() != null) {
			result.put("city",this.getCity());
		}
		if (this.getArea() != null) {
			result.put("area",this.getArea());
		}
		if (this.getCommunityId() != null) {
			result.put("communityId",this.getCommunityId());
		}
		if (this.getCommunityName() != null) {
			result.put("communityName",this.getCommunityName());
		}
		if (this.getStatus() != null) {
			result.put("status",this.getStatus());
		}
		if (this.getReason() != null) {
			result.put("reason",this.getReason());
		}
		if (this.getCreateTime() != null) {
			result.put("createTime",this.getCreateTime());
		}
		if (this.getUpdateTime() != null) {
			result.put("updateTime",this.getUpdateTime());
		}
		return result;
	}


	@Override
	public String toString() {
		return "UmsMemberLog [id=" + id + " , name=" + name + " , phone=" + phone + " , idCard=" + idCard + " , province=" + province + " , city=" + city + " , area=" + area + " , communityId=" + communityId + " , communityName=" + communityName + " , status=" + status + " , reason=" + reason + " , createTime=" + createTime + " , updateTime=" + updateTime + "  ]";
	
	}
	
	
}
